lib/deploy: Ignore FIFREEZE/FITHAW errors when already in state
authorDan Nicholson <nicholson@endlessm.com>
Wed, 11 Oct 2017 14:03:10 +0000 (14:03 +0000)
committerAtomic Bot <atomic-devel@projectatomic.io>
Wed, 11 Oct 2017 15:40:20 +0000 (15:40 +0000)
commita5b7660c940a200adac1a7d217e4a1cd72719021
treeda3fa6b1483f378abcbfe4f9a15aa552366c7f61
parent1c9975cbd12b05927e1969e5675479aea437188b
lib/deploy: Ignore FIFREEZE/FITHAW errors when already in state

If the filesystem is already frozen, FIFREEZE returns EBUSY, and if the
filesystem is already thawed, FITHAW returns EINVAL. It's very unlikely
these issues would arise on a real ostree system since the sysroot would
be locked during the freeze/thaw cycle.

However, when multiple fake sysroots are used during the test suite (run
as root), the tests could race to run the freeze/thaw cycle without
locking. Furthermore, there's no reason why an independent process might
be trying to freeze the filesystem while ostree was deploying. Ignore
but warn for these errors since there's not much ostree can do about it,
anyways.

Closes: #1260
Approved by: cgwalters
src/libostree/ostree-sysroot-deploy.c